home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7714 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: rain.fr!world-net!usenet
  2. From: Frederic LACHASSE <lachass@worldnet.fr>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Q: implementing streambuf::underflow() method
  5. Date: Sun, 25 Feb 1996 16:36:57 +0000
  6. Organization: World-Net information exchange, Internet provider.
  7. Message-ID: <VA.0000004c.00479ff9@fred>
  8. References: <4gij8m$pi7@news.xs4all.nl>
  9. Reply-To: lachass@worldnet.fr
  10. NNTP-Posting-Host: client15.sct.fr
  11. X-Newsreader: Virtual Access by Ashmount Research Ltd, http://www.ashmount.com
  12.  
  13. In article <4gij8m$pi7@news.xs4all.nl>, Ronald Werring 
  14. <ronaldw@xs4all.nl> wrote:
  15. > I want to make a subclass of the streambuf class to
  16. > implement a different buffering strategy for an istream.
  17. > I use Visual-C++ (1.5 and 4.0).
  18. > My question: "When is underflow() called? Only when
  19. >               the buffer is empty or for every character?"
  20.  
  21. Very simple: underflaow() is called when the buffer is empty and a 
  22. new character is needed. That may mean for each new character if the 
  23. stream is unbuffered (so the buffer is always empty...).
  24.  
  25. I hope this'll help.
  26.  
  27.  Frederic LACHASSE (ECP 86)
  28.  CompuServe: 100530,2005
  29.  Internet: lachass@worldnet.fr
  30.  
  31.